// 业务员提成主页面表格数据
export const salesManColumns = info => {
  return [
    {
      label: '业绩单号',
      prop: 'commissionNum',
      minWidth: 120
    },
    {
      label: '月份',
      prop: 'month'
    },
    {
      label: '业务员',
      prop: 'salemanName'
    },
    {
      label: '所属部门',
      prop: 'apartmentName'
    },
    {
      label: '交易客户数',
      prop: 'customerNumber'
    },
    {
      label: '回款总额',
      prop: 'returnedMoney'
    },
    {
      label: '应发提成',
      prop: 'shouldPrice'
    },
    {
      label: '核发提成',
      prop: 'verifyPrice'
    },
    {
      label: '回款记录',
      prop: 'returnedNumber'
    },
    {
      label: '业绩核算状态',
      render: (h, row) => {
        let map = {
          '0': 'fc-blue mr5 fs12',
          '1': 'fc-warn mr5 fs12',
          '2': 'fc-success mr5 fs12',
          '3': 'fc-error mr5 fs12'
        }
        let type = map[row.status] || 'fc-normal mr5 fs12'
        return (
          <span class={type}>
            ●{row.statusName}
          </span>
        )
      }
    },
    {
      button: true,
      label: '操作',
      fixed: 'right',
      width: 120,
      render: (h, row) => {
        const detail = (
          <el-button
            type="text"
            onClick={() => {
              info.onDetail(row)
            }}
          >
              详情
          </el-button>
        )
        return [detail]
      }
    }
  ]
}
